Run with SquidGuard
2013/05/12 |
In addition to squidClamav, Run Squid with SquidGuard that is a URL redirector used to use blacklists.
|
|
[1] | Install SquidGuard |
root@lan:~#
root@lan:~# aptitude -y install squidguard mv /etc/squidguard/squidGuard.conf /etc/squidguard/squidGuard.conf.bk
root@lan:~#
vi /etc/squidguard/squidGuard.conf # create new ( most simply setting )
dbhome /var/lib/squidguard/db logdir /var/log/squid dest deny { # define prohibited domain file for 'deny' domainlist deny/domains # define prohibited URL file for 'deny' urllist deny/urls } acl { default { # allow all except 'deny' pass !deny all # redirect URL redirect http://www.srv.world/error.html } } mkdir /var/lib/squidguard/db/deny
root@lan:~#
vi /var/lib/squidguard/db/deny/domains # write domains you'd like to prohibit to access
yahoo.co.jp
example.com
root@lan:~#
vi /var/lib/squidguard/db/deny/urls # write URLs you'd like to prohibit to access
www.yahoo.co.jp/deny/
www.example.com/ squidGuard -C all 2013-05-12 02:59:33 [18123] INFO: squidGuard 1.5 started (1368295173.365) 2013-05-12 02:59:33 [18123] INFO: db update done 2013-05-12 02:59:33 [18123] INFO: squidGuard stopped (1368295173.407) root@lan:~# chown -R c-icap:proxy /var/lib/squidguard
root@lan:~#
chown -R c-icap:proxy /var/log/squidguard
root@lan:~#
vi /etc/squidclamav.conf # line 21: uncomment and change PATH squidguard /usr/bin/squidGuard
/etc/init.d/c-icap restart Restarting c-icap: 2013-05-12 03:04:31 [18259] INFO: squidGuard stopped (1368295471.105) c-icap. root@lan:~# 2013-05-12 03:04:33 [18307] INFO: squidGuard 1.5 started (1368295473.105) 2013-05-12 03:04:33 [18307] INFO: squidGuard ready for requests (1368295473.110) |
[2] | Try to access to the URL set as prohibited domain in [1]. |